<?php include $this->tpl('public:common.php') ?>
    
<div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">菜单模块链接列表</a></li>
    </ul>	
	
	<div id="myTabContent" class="tab-content">
		  <div class="tab-pane active in" id="home">

           <form id="tab" method="post" action="">
				 <table class="table table-striped">
              <thead>
                <tr>
					<th><input type="checkbox" id="checkAll" >全选</th>
					<th>#</th>
					<th>名称</th>
					<th>URL</th>
					<th>#Module</th>
					<th >菜单</th>
					<th >是否在线</th>
					<th >快捷菜单</th>
					<th>描述</th>
                </tr>
              </thead>
              <tbody>							  
				<?php foreach($menus as $menu):?>
					<tr>
					 
					<td>
					<?php if($menu['menu_id'] <=100 ):?>
					<input type="checkbox" name="menu_ids[]" value="<?=$menu['menu_id']?>" disabled>
					<?php else:?>
					<input type="checkbox" name="menu_ids[]" value="<?=$menu['menu_id']?>" >
					<?php endif?>
					</td>
					<td><?=$menu['menu_id']?></td>
					<td><?=$menu['menu_name']?></td>
					<td><?=$menu['menu_url']?></td>
					<td><?=$menu['module_id']?></td>
					<td>
					<?php if($menu['is_show']):?>
						是
					<?php else:?>
						否
					<?php endif?>
					</td>
					<td>
					<?php if($menu['online']):?>
						在线
					<?php else:?>
						已下线
					<?php endif?></td>
					<td>
					<?php if($menu['shortcut_allowed']):?>
						允许
					<?php else:?>
						不允许
					<?php endif?>
					</td>
					<td><?=$menu['menu_desc']?></td>
					</tr>
				<?php endforeach ?>
              </tbody>
            </table> 
			<?php if($module_id > 1 ):?>
			<label>选择菜单模块</label>
				<select name="module" id="DropDownTimezone" class="input-xlarge">
					<?php foreach($module_options_list as $key=>$item):?>
						<option value="<?=$key?>"><?=$item?></option>
					<?php endforeach?>
				</select>
				<div class="btn-toolbar">
					<button type="submit" class="btn btn-primary"><strong>修改菜单模块</strong></button>
				</div>
			<?php endif?>
			</form>
        </div>
    </div>
</div>

<script type="text/javascript">
$("#checkAll").click(function(){
     if($(this).attr("checked")){
		$("input[name='menu_ids[]']").attr("checked",$(this).attr("checked"));
	 }else{
		$("input[name='menu_ids[]']").attr("checked",false);
	 }
});
</script>

<?php include $this->tpl('public:footer.php') ?>